package study.lagou.com.io;

import java.io.InputStream;

/**
 * @Description: 功能描述
 * @Author houjh
 * @Email: happyxiaohou@gmail.com
 * @Date: 2021-1-28 20:45
 */
public class Resources {

    //根据配置文件路径，将配置文件加载成字节输入流，存放到配置文件当中
    public static InputStream getResourceAsStream(String path){
        //借助类加载器，通过path对配置文件进行加载
        InputStream resourceAsStream = Resources.class.getClassLoader().getResourceAsStream(path);
        return resourceAsStream;
    }

}
